ComponentOne ADO.NET DataExtender
C1.C1DataExtender.2 Assembly / C1.C1DataExtender Namespace / C1DataView Class / Find Method / Find(Object[]) Method
An array of sort key values. The order of values in the array must correspond to the order of columns specified in the Sort property. If the System.Type of some array value differs from the C1ViewColumn.DataType of the corresponding sort key column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

In This Topic
    Find(Object[]) Method
    In This Topic
    Finds a row in this C1DataView by the specified sort key value.
    Syntax
    'Declaration
     
    Public Overloads Function Find( _
       ByVal sortKey() As System.Object _
    ) As System.Integer
    public System.int Find( 
       System.object[] sortKey
    )

    Parameters

    sortKey
    An array of sort key values. The order of values in the array must correspond to the order of columns specified in the Sort property. If the System.Type of some array value differs from the C1ViewColumn.DataType of the corresponding sort key column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

    Return Value

    An index of the row if it was found; otherwise a negative number, which is the bitwise complement of the index of the next row which key is larger than specified.
    Remarks
    Finds a row in the C1DataView by the specified sort key value and returns its index or, in the case that a row is not found, a negative number, which is the bitwise complement of the index of the next row which key is larger than specified. The length of the specified sort key can be less then number of sort columns specified in the Sort property. If a row has been found and there are multiple rows with the specified sort key then an accidental row index that matches the search criteria is returned.
    See Also